﻿#ifndef WIN_MAIN_H
#define WIN_MAIN_H

//#include <QWidget>
#include "custom_ui/framelesswidget.h"
#include "qevent.h"

class QAbstractButton;
//class FramelessWidget;

namespace Ui {
class mainWindow;
}

class mainWindow : public FramelessWidget
{
    Q_OBJECT

public:
    explicit mainWindow(QWidget *parent = 0);
    ~mainWindow();

protected:
    //bool eventFilter(QObject *watched, QEvent *event);
    void keyPressEvent(QKeyEvent *ev);

private:
    Ui::mainWindow *ui;
    FramelessWidget* frameless;

    QList<int> iconsMain;
    QList<QAbstractButton *> btnsMain;

    QList<int> iconsConfig;
    QList<QAbstractButton *> btnsConfig;

private slots:
    void initForm();
    void initStyle();
    void buttonClick();
    void initLeftMain();
    void initLeftConfig();
    void leftMainClick();
    void leftConfigClick();

private slots:
    void on_titleDblClick();
    void on_windowStateChange(bool max);

    void on_btnMenu_Min_clicked();
    void on_btnMenu_Max_clicked();
    void on_btnMenu_Close_clicked();

    void on_btnMenu_real_clicked();
    void on_btnMenu_playback_clicked();
    void on_btnMenu_download_clicked();
    void on_btnMenu_appcenter_clicked();    
    void on_fullScreen(bool max);
};

extern mainWindow *g_mainWindow;

#endif // WIN_MAIN_H
